package com.webbei.myCustom.action;

import java.util.List;

import org.apache.struts2.ServletActionContext;

import net.sf.json.JSONArray;

import com.webbei.myCustom.service.myCustomService;
import com.webbei.pojo.Customer;
import com.webbei.pojo.Customs;
import com.webbei.pojo.Orders;

public class ShowMyOrderAction {
	private myCustomService cusSer;
	private String userName; 
	//private Customer customer;
	private List<Orders> ordersList;
	
	public String execute(){
		userName=(String) ServletActionContext.getContext().getSession().get("username");
		//customer=cusSer.getCustomerByUserName(userName);
		ordersList=cusSer.getOrderByUserName(userName);
		return "success";
	}


	public void setCusSer(myCustomService cusSer) {
		this.cusSer = cusSer;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

//	public Customer getCustomer() {
//		return customer;
//	}
//
//	public void setCustomer(Customer customer) {
//		this.customer = customer;
//	}

	public List<Orders> getOrdersList() {
		return ordersList;
	}



	public void setOrdersList(List<Orders> ordersList) {
		this.ordersList = ordersList;
	}
}
